#!/bin/bash

ISOIMAGE_NAME="eyespy-i686"
CDROM_TITLE="EYESPY i686"
FATIMAGE_NAME=${ISOIMAGE_NAME}
FAT_TITLE="EyeSpy"

BOOTFAT_IMAGE_SIZE=250

TARGET_ARCH="i686-linux"
TOOLCHAIN_PREFIX="/opt/${TARGET_ARCH}/toolchain"
TOOLCHAIN_SYSROOT="/opt/${TARGET_ARCH}/sysroot"

KERNEL_VERSION="2.6.32"
KERNEL_CONFIG=i686-kernel-2.6.32
TARGET_KERNEL_IMAGE=bzImage

USE_SPLASH="yes"
USE_INITRAMFS="yes"
USE_AUFS2="yes"

PHP_LIBXPM="no"

LIBC_GCONV_MODULES="CP1252.so"

. $SETS_DIR/packages-basic.inc
. $SETS_DIR/packages-acpi.inc
. $SETS_DIR/packages-mmlibs.inc
. $SETS_DIR/packages-libs.inc
. $RULES_DIR/wpa_supplicant.sh

#. $SETS_DIR/packages-xorg-xlib.inc
#. $SETS_DIR/packages-hal.inc
#. $RULES_DIR/boolstuff.sh
#. $RULES_DIR/halevt.sh
#. $BSP_SETS_DIR/packages-gui.sh

. $BSP_SETS_DIR/packages-dfbgui.sh

. $BSP_SETS_DIR/packages-netsurf.inc

. $SETS_DIR/packages-net-addons.inc
. $SETS_DIR/packages-webserver.inc
. $BSP_SETS_DIR/packages-cam.sh

. $RULES_DIR/gdb.sh

. $RULES_DIR/install_locale.sh

. $BSP_RULES_DIR/customize-eyespy.sh

. $RULES_DIR/tweak-i686.sh

if [ "$USE_INITRAMFS" = "yes" ]; then
    INITRAMFS_MODULES=`cat $ROOTFS_DIR/lib/modules/*/modules.dep | grep '/scsi/\|/pata/\|/block/' | sed 's/\://' | cut -f1 -d' ' | while read f; do echo ${f/*\/}; done | sed 's/\.ko//' | sort | uniq`
    INITRAMFS_MODULES="$INITRAMFS_MODULES usb-storage ohci-hcd ehci-hcd sg vfat isofs udf nls_cp437 nls_utf8 nls_iso8859-1"
    echo ">>>$INITRAMFS_MODULES"
    . $RULES_DIR/create_initramfs.sh
fi

. $SETS_DIR/packages-host-squashfs.inc

. $RULES_DIR/create_squashfs.sh
. $RULES_DIR/host_syslinux.sh
. $RULES_DIR/create_x86cd.sh
. $RULES_DIR/create_bootfat.sh
